package com.youbug.mall.pms.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.youbug.common.vo.QueryVo;
import com.youbug.common.vo.R;
import com.youbug.mall.pms.entity.AttrGroup;
import com.youbug.mall.pms.service.IAttrGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 属性分组 前端控制器
 * </p>
 *
 * @author youbug
 * @since 2023-07-08
 */
@RestController
@RequestMapping("/pms-attr-group")
public class AttrGroupController {

    @Autowired
    private IAttrGroupService attrGroupService;

    @PostMapping("/getAttrGroupsByCateId")
    public R<IPage<AttrGroup>> getUser(@RequestBody QueryVo<Long> queryVo){

        IPage<AttrGroup> attrGroupPage = attrGroupService.getAttrGroupPage(queryVo);

        return R.ok(attrGroupPage);
    }
}

